package com.hxzy.module.admin.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hxzy.framework.web.util.WebFrameworkUtils;
import com.hxzy.module.admin.entity.AdminRoleInnerModule;
import com.hxzy.module.admin.service.AdminRoleInnerModuleService;
import com.hxzy.module.admin.mapper.AdminRoleInnerModuleMapper;
import org.springframework.stereotype.Service;

/**
* @author 11452
* @description 针对表【admin_role_inner_module(总部角色模块关联表)】的数据库操作Service实现
* @createDate 2024-01-28 10:57:28
*/
@Service
public class AdminRoleInnerModuleServiceImpl extends ServiceImpl<AdminRoleInnerModuleMapper, AdminRoleInnerModule>
    implements AdminRoleInnerModuleService{

    @Override
    public Long deleteModuleByRoleId(Long roleId, Long merchantId) {
        return this.baseMapper.deleteModuleByRoleId(roleId,merchantId);
    }

    /**
     * 根据角色id查询账号的个数
     * @param roleId
     * @return
     */
    @Override
    public long existsAccountInnerRoleByRoleId(Long roleId) {
        Long merchantId = WebFrameworkUtils.getMerchantId();
        return this.baseMapper.existsAccountInnerRoleByRoleId(roleId,merchantId);
    }


}




